package cn.com.dhcc.app.pub.core.job;

import cn.com.dhcc.app.core.exception.ServiceException;
import cn.com.dhcc.app.core.service.Log;
import cn.com.dhcc.app.pub.CM;
import cn.com.dhcc.ddi.task.service.TaskService;
import org.apache.log4j.Logger;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * @日期：2017/2/7 08:55
 * @作者：张洪涛
 * @版权所有：东华软件
 * @版本：1.0
 */
public class TestingTaskStatusJob extends QuartzJobBean {
    @SuppressWarnings("deprecation")
    Logger logger = Log.getExistLogger(Log.LOGTYPE.ADAPTER);

    @Override
    protected void executeInternal(JobExecutionContext context)throws JobExecutionException {
        logger.info("发送任务状态检测开始...");
        TaskService taskService = CM.getBean(TaskService.class);
        try {
            taskService.testingTaskStatus();
        } catch (ServiceException e) {
            logger.error("发送任务状态检测异常",e);
        }

    }
}
